
cc.Class({
    extends: cc.Component,

    properties: {
        bg_sp:cc.Sprite,
        gift_icon:cc.Sprite,
        num:cc.Label,
        All_mail:cc.SpriteAtlas

    },

    // LIFE-CYCLE CALLBACKS:

    // onLoad () {},

    start () {

    },
    init(data){
        this.bg_sp.getComponent(cc.Sprite).spriteFrame=this.All_mail.getSpriteFrame(data.bgsp);
        this.gift_icon.getComponent(cc.Sprite).spriteFrame=this.All_mail.getSpriteFrame(data.icon);
        this.num.string=data.num;
    }

    // update (dt) {},
});
